<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>设备详情</title>
    <link href="{{asset('/bst/css/bootstrap.min.css')}}" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
</head>
<body>

<div style="margin-top: 20px" class="container-fluid">
    <div class="input-group mb-3">
        <span class="input-group-text" id="basic-addon1">设备名称:</span>
        <input disabled type="text" value="{{$record->name}}" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
    </div>
    <div class="input-group mb-3">
        <span class="input-group-text" id="basic-addon1">设备编码:</span>
        <input disabled type="text" value="{{$record->code}}" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
    </div>
    <div class="input-group mb-3">
        <span class="input-group-text" id="basic-addon1">设备状态:</span>
        <input disabled type="text" value="{{$record->status_name}}" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
    </div>
    <div class="input-group mb-3">
        <span class="input-group-text" id="basic-addon1">是否在用:</span>
        <input disabled type="text" value="{{$record->busy}}" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
    </div>
    <div class="input-group mb-3">
        <span class="input-group-text" id="basic-addon1">业务分类:</span>
        <input disabled type="text" value="{{$record->getType->business_name}}" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
    </div>
    <div class="input-group mb-3">
        <span class="input-group-text" id="basic-addon1">设备类型:</span>
        <input disabled type="text" value="{{$record->getType->name}}" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
    </div>
    <div class="input-group mb-3">
        <span class="input-group-text" id="basic-addon1">地点:</span>
        <input disabled type="text" value="{{$record->coal.'---'.$record->region.'---'.$record->local}}" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
    </div>
    <div class="input-group mb-3">
        <span class="input-group-text" id="basic-addon1">备注:</span>
        <input disabled type="text" value="{{$record->beizhu}}" class="form-control" aria-label="Username" aria-describedby="basic-addon1">
    </div>

    <h1>使用记录</h1>

    @foreach($record->getLog as $log)
        <ul class="list-group">
            <li class="list-group-item"  @if($log->oper_type==1) style="color: red" @else style="color: #0b5ed7" @endif >
                {{$log->oper_type==1?'安装':'回收'}}
            </li>
            <li class="list-group-item">地点：{{$log->coal.'---'.$log->region.'---'.$log->local}}</li>
            <li class="list-group-item">负责人：{{$log->people}}</li>
            <li class="list-group-item">时间：{{$log->date}}</li>
            <li class="list-group-item">备注：{{$log->beizhu}}</li>
        </ul>
        <br/>

    @endforeach
</div>




</body>
</html>
